package com.yipinhouse.signing.service;

import com.alipay.api.AlipayApiException;
import com.yipinhouse.signing.infra.model.IntentionMoney;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yipinhouse.signing.service.dto.IntentionMoneyDto;
import com.yipinhouse.signing.service.param.IntentionMoneyServiceParam;

import java.io.UnsupportedEncodingException;

/**
 * <p>
 * 意向金 服务类
 * </p>
 *
 * @author WangCong
 * @since 2022-12-01
 */
public interface IntentionMoneyService extends IService<IntentionMoney> {

    /**
     * 新增意向金记录
     *
     * @param param
     * @return
     */
    IntentionMoneyDto insertIntentionMoney(IntentionMoneyServiceParam param) throws InterruptedException;

    /**
     * 支付宝支付
     * @param intentionMoneyNum
     * @return
     */
    String pay(String intentionMoneyNum) throws UnsupportedEncodingException, AlipayApiException;

    /**
     * 支付宝支付回调
     */
    void payok(Integer id);
}
